package org.csmzxy.class2333;

public class Exercise01 {
    public static void main(String[] args) {
        int[] arr = {1, 3, 5, 7};
        int maxValue = findMaxValue(arr);
        System.out.println("数组的最大值是：" + maxValue);
    }
    public static int findMaxValue(int[] array) {
        int maxValue = array[0];
        for (int i = 1; i < array.length; i++) {
            if (array[i] > maxValue) {
                maxValue = array[i];
            }
        }
        return maxValue;
    }
}